<include file="../Public/header" />
<link href="{:APPS_URL}/w3g/_static/style.css" rel="stylesheet" type="text/css" />
<style type="text/css">
  body{background-color: #f8f8f8;}
</style>
<div id="content">
    <div id="weiba" data-title="编辑个人资料" class="panel" data-selected="true"  data-menu="msgmenu" style="padding:0;">
        <header>
            <div id="header-buttons">
                <a href="javascript:history.go(-1);">
                    <div id="back" class="header-menu-link" data-back="false">
                    </div>
                </a>
                <div id="messageLink" class="header-menu-link"><a href="{:U('w3g/Index/msgbox')}"><i class="num"></i></a></div>
        <div id="menuLink" class="header-menu-link"></div>
            </div>
            <h1 class="hasback">
                编辑个人资料
            </h1>
        </header>
    <div class="set-item" id="">
         <div class="form-set0">
            <dl class="arbg" onclick="javascript:window.open('{:U('w3g/Setting/setName')}','_self')">
                <dt>昵称</dt>
                <dd>{$user.uname}</dd>
            </dl>
            <dl>
                <dt>性别</dt>
                <dd><select id="sex" name="sex" ><option value="1" <eq name="user.sex" value="1">selected</eq>>男</option><option <eq name="user.sex" value="2">selected</eq> value="2">女</option></select></dd>
            </dl>
            <dl class="arbg" onclick="javascript:window.open('{:U('w3g/Setting/setArea')}','_self')">
                <dt>地区</dt>
                <dd>{$user.location}</dd>
            </dl>
            <dl class="arbg noborder" onclick="javascript:window.open('{:U('w3g/Setting/setIntro')}','_self')">
                <dt>简介</dt>
                <dd>{$user.intro}</dd>
            </dl>
         </div>
         <div class="setBtn"><a href="javascript:;" class="btn-big" onclick="setSex()">保存</a></div>
    </div>
</div>
<script type="text/javascript">
    function setSex(){
      $.ajax({
        type : 'post',
        url : location.href,
        data: {'ajaxSubmit':1,'sex': $('#sex').val()},
        timeout : 10000,
        dataType: 'json',
        success : function(d){
            if(d && d.status){
                location.href=U('w3g/Setting');
            }
            else{
                $.ui.showMask(d.info,true);
            }
        },
        error: function(r){
            $.ui.showMask("连接服务器失败，请重试:)",true);
        }
      });
    }
</script>
<include file="../Public/footer" />